<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
	</head>
	<script type="text/javascript" src="../../../resource/script/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="./images/jcarousellite_1.0.1.min.js"></script>
	<style type="text/css">
	body{ padding:10px; margin:0; text-align:center; font-size:12px; text-align:center; overflow:hidden;}
	div{ padding:0px; margin:0px auto;}
	.main{ margin:0 auto;}
	.mainpic { width:100%;}
	.left{ float:left; width:70%; }
	#adpicscroll{ margin-top:10px;}
	.right{ float:right; width:30%; text-align:center;} 
	.adpic{list-style-type: none;margin: 10px 0 0 0;padding: 0px;}
	.adpic li{ float:left; margin-right:4px; width:33%;}
	.adpic li img{ width:100%;}
	.timer{ font-size:26px; color:#00000; font-weight:600; padding:10px 0 20px;}
	.content{ padding:10px;}
	</style>
	<body>
	<div class="main">
		<div class="left">
			<div class="mainpic">
				<img src="{$_W['attachurl']}{$device['mainpic']}" width="100%" />
			</div>
			<div id="adpicscroll">
				<ul class="adpic">
					{loop $device['adpics'] $row}
					<li><img src="{$_W['attachurl']}{$row}" width="100%" /></li>
					{/loop}
				</ul>
			</div>
		</div>
		<div class="right">
			<div class="timer" id="timer" ></div>
			<div class="qrcode">
				<img src="{$device['qrcode']}" width="100%" />
			</div>
			<div class="content">{php echo htmlspecialchars_decode($device['content'])}</div>
		</div>
	</div>
	<script type="text/javascript">
	<!--
		$('#adpicscroll').jCarouselLite({
			auto: 5000,
			speed: 200
		});

		function showLocale(objD) {
			var str,colorhead,colorfoot;
			var yy = objD.getYear();
			if(yy<1900) yy = yy+1900;
			var MM = objD.getMonth()+1;
			if(MM<10) MM = '0' + MM;
			var dd = objD.getDate();
			if(dd<10) dd = '0' + dd;
			var hh = objD.getHours();
			if(hh<10) hh = '0' + hh;
			var mm = objD.getMinutes();
			if(mm<10) mm = '0' + mm;
			var ss = objD.getSeconds();
			if(ss<10) ss = '0' + ss;
			var ww = objD.getDay();
			if  ( ww==0 )  colorhead="<font color=\"#FF0000\">";
			if  ( ww > 0 && ww < 6 )  colorhead="<font color=\"#373737\">";
			if  ( ww==6 )  colorhead="<font color=\"#008000\">";
			if  (ww==0)  ww="星期日";
			if  (ww==1)  ww="星期一";
			if  (ww==2)  ww="星期二";
			if  (ww==3)  ww="星期三";
			if  (ww==4)  ww="星期四";
			if  (ww==5)  ww="星期五";
			if  (ww==6)  ww="星期六";
			colorfoot="</font>"
			str = colorhead + yy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss + "  " + ww + colorfoot;
			return(str);
		}
		function tick() {
			var today;
			today = new Date();
			$('#timer').html(showLocale(today));
			window.setTimeout("tick()", 1000);
		}

		$(function(){
			tick();
		});
	//-->
	</script>
	</body>
</html>
